<template>
    <div>
        <el-form ref="form" :model="params" label-width="70px">
            <el-container>
                <el-form-item label="案号">
                    <el-input v-model="params.userRealname"></el-input>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" @click="search">检索</el-button>
                </el-form-item>
            </el-container>
        </el-form>


        <el-table
                @row-click="handdle"
                :data="pageResult.records"
                border
                style="width: 100%">
            <el-table-column
                    fixed
                    prop="userRealname"
                    label="姓名"
                    width="180">
            </el-table-column>
            <el-table-column
                    prop="userPhone"
                    label="手机号码"
                    width="180">
            </el-table-column>
            <el-table-column
                    prop="userStatus"
                    label="状态"
                    width="180">
            </el-table-column>
        </el-table>
        <el-footer class="case-exam-footer">
            <el-pagination
                    background
                    layout="prev, pager, next"
                    :total="pageResult.total"
                    :page-size="pageResult.size"
                    class="pagination"
                    @current-change="handleIndexChange"
            >
            </el-pagination>
        </el-footer>
    </div>
</template>

<script>

    import SystemUserService from '../../../model/mfy/system_user/SystemUserService.js'
    var  systemUserService =SystemUserService.getInstance();


    export default {
        name: "recordcaseLaw",
        data(){
            return{
                pageResult:{},
                params:{},
            }
        },
        methods:{
            //查询所有案件
            list(){
                systemUserService.selectUserAboutRecord(this.params).then((response)=>{
                    this.pageResult=response.data.data
                });
            },
            handleIndexChange(index){
                this.params.page = index
                this.list()
            },
            search(){
                this.params.page=1
                this.list()
            },
            handdle(row){
                this.$emit("userRealname",row.userRealname)
            },
        },

        created() {
            this.list();
        },
    }
</script>

<style scoped>

</style>